package com.tianji.aopdemo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync;

import java.net.UnknownHostException;

/**
 * @author Yandel
 * @date 2025/8/15 下午7:25
 * @description: 优惠券模块启动类
 */
//@MapperScan("com.tianji.promotion.mapper")
@EnableAspectJAutoProxy(exposeProxy = true)//露代理对象，暴露之后代码中就可以获取到代理对象
@SpringBootApplication
@Slf4j
@EnableAsync
public class AopDemoApplication {
    public static void main(String[] args) throws UnknownHostException {
        SpringApplication app = new SpringApplicationBuilder(AopDemoApplication.class).build(args);
        Environment env = app.run(args).getEnvironment();
        String protocol = "http";
        if (env.getProperty("server.ssl.key-store") != null) {
            protocol = "https";
        }
    }
}
